<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>粘性定位</title>
    <!-- 粘性定位占有原来的位置。2、必须添加top、left、right、bottom其中一个才有效 -->
    <!-- 目前不使用 -->

    <!-- 定位叠放次序Z-index   1、数值可以是正整数、负数或为0，默认是auto,数值越大，盒子越靠上
   2、 数字后面不能加单位  3、如果属性值相同，则按照书写顺序，后来居上  4、定位盒子才有z-index属性 -->
    <link rel="stylesheet" href="position.css">
</head>
<body>
    <div class="nav">我是导航栏</div>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
    <p>fefefef</p>
</body>
</html>